package com.itrident.util;

import com.intellij.openapi.application.PathManager;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @author cxx
 * @create 2021-04-15 14:10
 **/
public class IdeaUtil {

    public static String getValue(String key){
        return System.getProperties().getProperty (key);
    }

//    public static Properties getIdeaProperties(){
//        String ideaPropertiesPath = getIdeaPropertiesPath ();
//        Properties properties = new Properties ();
//        try {
//            if(ideaPropertiesPath != null)
//                properties.load (new FileInputStream (ideaPropertiesPath));
//        } catch (IOException e) {
//            e.printStackTrace ();
//        }
//        return properties;
//    }
//
//    private static String getIdeaPropertiesPath(){
//        String configPath = PathManager.getCustomOptionsDirectory ();
//        return configPath != null ? configPath + File.separator + PathManager.PROPERTIES_FILE_NAME : null;
//    }

}
